package text;

import java.util.Random;

public class text2 {
    public static void main(String[] args) {
        //int j = 200;
        //int count = 0;
        //while (j-- != 0) {
            Random r = new Random();
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < 4; ) {
                int randomChar = r.nextInt(65, 123);
                if (randomChar > 90 && randomChar < 97) {
                    continue;
                } else {
                    sb.append((char) randomChar);
                    i++;
                }

            }
            sb.append(r.nextInt(10));
            char[] arr = sb.toString().toCharArray();
            char temp = arr[arr.length - 1];
            int randomIndex = r.nextInt(arr.length);
            arr[arr.length - 1] = arr[randomIndex];
            arr[randomIndex] = temp;
            System.out.println(new String(arr));
        //count++;
        //}
        //System.out.println(count);
    }
}
